<template>
    <div v-if="user">
        <van-cell title="个人信息" is-link  to="/user/page"/>
        <van-cell title="加入的队伍" is-link to="/team/my/join" />
        <van-cell title="创建的队伍" is-link to="/team/my/create"/>
    </div>
    <div v-else>
        <user-login></user-login>
    </div>
</template>
  
  
  
  
  
<script setup lang="ts">
import {onMounted,ref} from 'vue'
import myAxios from '../../plugins/myAxios';
import UserLogin from '../user/UserLogin.vue'

onMounted(()=>{
    getUser()
})

const user = ref();
const getUser = async()=>{
  await myAxios.get('/user/current').then((res)=>{
    user.value = res.data.data;
  })
}

</script>



<style scoped>

</style>